import App from './App.vue';
import { createApp } from 'vue'
import './style.css'
import store from '@/store/index';
import { basicSetup } from 'codemirror'
import VueCodemirror from 'vue-codemirror'
import { vue } from '@codemirror/lang-vue'
import { vscodeDark } from '@/utils/codemirror/theme/vscode-dark-theme'

const app = createApp(App)
app.use(store)
app.use(VueCodemirror, {
  autofocus: true,
  disabled: false,
  indentWithTab: true,
  tabSize: 2,
  placeholder: '请输入代码',
  extensions: [basicSetup, vscodeDark, vue()],
  options: { theme: 'vscode-dark'},
  style: { height: 'calc(100vh - 80px)', width: 'calc(100vw - 360px)' }
})
app.mount('#app')
.$nextTick(() => {
  postMessage({ payload: 'removeLoading' }, '*')
})